//获取客户或供应商编码
function getCode(type,prefix,suffix) {
    var code="";
    $.ajax({
        type : 'GET',
        //  url : 'resource/getTree',
        data:{"type":type,"prefix":prefix,"suffix":suffix},
        url:'codegeneration/getCode',
        dataType:"json",
        /*  contentType: 'application/json',*/
        async:false,
        success : function (da) {
            if(da.status==200 ){
                code=da.data;
            }
        },
        error: function(data) {
            // layer.msg("获取失败!");
        }
    });
    return code;
}